/* eslint-disable */
// @ts-ignore
import { queryOptions, useMutation } from '@tanstack/vue-query';
import type { DefaultError } from '@tanstack/vue-query';
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as apis from './parkingLotController';
import * as API from './types';

/** 停车场详情 GET /api/parking_lot/detail */
export function detailUsingGet1QueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.detailUsingGET1Params;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.detailUsingGet1(queryKey[1] as typeof options);
    },
    queryKey: ['detailUsingGet1', options],
  });
}

/** 根据经纬度查找停车场 GET /api/parking_lot/find */
export function findUsingGetQueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.findUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.findUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['findUsingGet', options],
  });
}

/** 停车场列表 GET /api/parking_lot/list */
export function listUsingGet1QueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.listUsingGET1Params;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.listUsingGet1(queryKey[1] as typeof options);
    },
    queryKey: ['listUsingGet1', options],
  });
}
